let user = {}

user.name = 'John';

user.surname = 'Smith';

user.name = 'Pete';

delete user.name;

for (let key in user) {
    alert(user[key]);
}